<template>
	<view>
		<view class="webGoBack" @click="goToBack()">
			<view class="text">
				<view class="webGoBack-text">{{$t('返回')}}</view>
				<view class="webGoBack-text">{{$t('商城')}}</view>
			</view>
		</view>
		<view class="webview">
			<web-view :src="this.url"></web-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:'',
			}
		},
		onLoad(option) {
			if(typeof(option.url) != 'undefined'){
				this.url = option.url
			}else{
				this.$toast(this.t('获取链接失败'))
				uni.navigateBack();
			}
			// #ifdef APP-PLUS
			setTimeout(()=>{
				this.playVideo()
			},800)
			// #endif
		},
		methods: {
			goToBack(){
				console.log("laile")
				uni.switchTab({
					url: "/pages/tabBar/my"
				})
			},
			playVideo() {
				uni.getSubNVueById('goToBack').show();
				const subNVue = uni.getSubNVueById('goToBack');
				console.log(subNVue);
			},
		}
	
	}
</script>

<style lang="scss" scoped>
	.webGoBack{
		position: fixed;
		z-index: 100;
		bottom:150upx;
		right:30upx;
		width:100upx;
		height:100upx;
		background-color: #ccc;
		border-radius: 50upx;
	}
	.text{
		margin-top:20upx;
	}
	.webGoBack-text{
		text-align: center;
		font-size: 15upx;
		line-height: 30upx;
		color: #888;
	}
</style>